Operation Workflow.CompleteTaskOperation (Complete task)
In component org.nuxeo.ecm.platform.routing.operations
Description
Completes the input task. If this is the last task the workflow will continue. Returns back the task document. "Status" is the id of the button the user would have clicked to submit the task form (if the outgoing transitions of the workflow node that created the task have conditions depending on it).@since 5.9.3 and 5.8.0-HF11 you can set multiple node or workflow variables when completing the task (also similar to ending the task via form submision from the UI).The variables are specified as key=value pairs separated by a new line.To specify multi-line values you can use a \ character followed by a new line.
Example:
description=foo barFor updating a date, you will need to expose the value as ISO 8601 format, for instance :
Example:
workflowVarString=A sample value
workflowVarDate=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}
For all values, you have to submit a JSON representation. This is an example for a variable of type StringList:
nodeVarList = ["John Doe", "John Test"]
Operation id | Workflow.CompleteTaskOperation |
---|---|
Category | Workflow Context |
Label | Complete task |
Requires | Workflow |
Since |
Parameters
Name | Description | Type | Required | Default value |
---|---|---|---|---|
comment | string | no | ||
nodeVariables | properties | no | ||
status | string | no | ||
workflowVariables | properties | no |
Signature
Inputs | document, documents |
---|---|
Outputs | document, documents |
Implementation Information
Implementation Class | Class: org.nuxeo.ecm.platform.routing.core.api.operation.CompleteTaskOperation |
---|---|
Contributing Component | org.nuxeo.ecm.platform.routing.operations |
JSON Definition
{ "id" : "Workflow.CompleteTaskOperation", "label" : "Complete task", "category" : "Workflow Context", "requires" : "Workflow", "description" : "Completes the input task. If this is the last task the workflow will continue. Returns back the task document. \"Status\" is the id of the button the user would have clicked to submit the task form (if the outgoing transitions of the workflow node that created the task have conditions depending on it).@since 5.9.3 and 5.8.0-HF11 you can set multiple node or workflow variables when completing the task (also similar to ending the task via form submision from the UI).The variables are specified as <i>key=value</i> pairs separated by a new line.To specify multi-line values you can use a \\ character followed by a new line. <p>Example:<pre>description=foo bar</pre>For updating a date, you will need to expose the value as ISO 8601 format, for instance : <p>Example:<pre>workflowVarString=A sample value<br>workflowVarDate=@{org.nuxeo.ecm.core.schema.utils.DateParser.formatW3CDateTime(CurrentDate.date)}</pre><p>For all values, you have to submit a JSON representation. This is an example for a variable of type StringList:<p><pre>nodeVarList = [\"John Doe\", \"John Test\"]</pre></p>", "url" : "Workflow.CompleteTaskOperation", "signature" : [ "document", "document", "documents", "documents" ], "params" : [ { "name" : "comment", "description" : null, "type" : "string", "required" : false, "widget" : null, "order" : 0, "values" : [ ] }, { "name" : "nodeVariables", "description" : null, "type" : "properties", "required" : false, "widget" : null, "order" : 0, "values" : [ ] }, { "name" : "status", "description" : null, "type" : "string", "required" : false, "widget" : null, "order" : 0, "values" : [ ] }, { "name" : "workflowVariables", "description" : null, "type" : "properties", "required" : false, "widget" : null, "order" : 0, "values" : [ ] } ] }